<?php
	$user_id = Yii::app()->user->getId();
	//Get messenger
	$notification['messenger'] = MessengerController::viewListNotification($user_id);
	echo '<li><strong>Các tin nhắn chưa đọc : </strong></li>';
	foreach ($notification['messenger'] as $messenger)
	{
		$idDiv = 'divNotificationMessenger'.$messenger['user_id'];
		?>
		<li id="<?php echo $idDiv;?>">
		      <div style="float: left; clear: left; padding: 3px;height:50px;">
		      	<?php
		      	echo '<a href="javascript:void(0)" class="classNotificationMessenger" onclick="unreadMessengerClick('.'\'notificationMessage\','.$messenger['user_id'].')">';
				echo '<img src="'.Yii::app()->request->baseUrl.'/themes/fly_high/assets/img/avatar/'.$messenger['you']['avatar'].'" width="50px" class="classNotificationMessenger"/>';
		      	?>
		      </div>
		      <div style="height:50px;">
			    <?php
			    	echo '<strong>('.$messenger['you']['id'].')'.$messenger['you']['name'].' : <br/></strong>';
					echo $messenger['content'][count($messenger['content'])-1].' - Chưa đọc : '.count($messenger['content']);
					echo '<br/>'.$messenger['posttime'];
					echo '</a>';
			    ?>
		      </div>
		</li>
		<?php
	}
?>
<script type="text/javascript">
	var quantityNotificationMessengerUnRead = <?php echo MessengerController::getQuantityUnread($user_id);?>;
</script>